<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Questions')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-questions" class="form-control " rows="5" name="row[questions]" cols="50">{$row.questions|htmlentities}</textarea>
            <span class="help-block">一行一个问法，用户以任意一个问法达到匹配度，则自动回复</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Match')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-match" data-rule="required;range(1~100)" class="form-control" name="row[match]" type="number" value="{$row.match|htmlentities}">
            <span class="help-block">用户提问达到此匹配度,则自动回复 <a class="test_match" href="javascript:;">匹配度测试</a></span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Answer')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-answer" class="form-control editor" rows="5" name="row[answer]" cols="50">{$row.answer|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Admin_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:Form::selectpages('row[admin_id]', $row.admin_id, 'auth/admin/index', 'nickname', 'id', [])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status" }checked{/in} /> {$vo}</label>
                {/foreach}
                <span class="help-block">万能知识：当所有知识点均无法匹配时，则自动回复万能知识</span>
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
